package org.example.customstarter.controller;

import org.example.customstarter.demos.web.User;
import org.springframework.web.bind.annotation.*;

@RestController
public class LoginController {
    @PostMapping("/login")
    public String login(@RequestBody User user){
        if (user.getUsername().equals("admin") && user.getPassword().equals("123456")){
            return "success";
        }
        return "error";
    }
}
